iOS Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) by Keur Christian & Hillegass Aaron

iOS Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) by Keur Christian & Hillegass Aaron

Author:Keur,Christian & Hillegass,Aaron
Language: eng
Format: epub
Tags: Big Nerd Ranch Guides, iOS Programming, COM051370, iPhone Programming, Swift Programming, iPad Programming, Xcode
ISBN: 9780134689647
Publisher: Big Nerd Ranch Guides
Published: 2016-12-30T23:00:00+00:00


UINavigationController

A UINavigationController maintains an array of view controllers presenting related information in a stack. When a UIViewController is on top of the stack, its view is visible.

When you initialize an instance of UINavigationController, you give it a UIViewController. This UIViewController is added to the navigation controller’s viewControllers array and becomes the navigation controller’s root view controller. The root view controller is always on the bottom of the stack. (Note that while this view controller is referred to as the navigation controller’s “root view controller,” UINavigationController does not have a rootViewController property.)

More view controllers can be pushed on top of the UINavigationController’s stack while the application is running. These view controllers are added to the end of the viewControllers array that corresponds to the top of the stack. UINavigationController’s topViewController property keeps a reference to the view controller at the top of the stack.

When a view controller is pushed onto the stack, its view slides onscreen from the right. When the stack is popped (i.e., the last item is removed), the top view controller is removed from the stack and its view slides off to the right, exposing the view of the next view controller on the stack, which becomes the top view controller. Figure 14.3 shows a navigation controller with two view controllers. The view of the topViewController is what the user sees.

Figure 14.3 UINavigationController’s stack



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.